import base64

def image_to_base64(image_path):
    with open(image_path, "rb") as image_file:
        return base64.b64encode(image_file.read()).decode('utf-8')


# picpath = r'C:\Users\admin\Desktop\collecter\your_table_screenshot  - 副本 (5) - 副本 - 副本 - 副本 - 副本 - 副本.png'
# picBase64 = image_to_base64(picpath)
# print(picBase64)
